#include <stdio.h>
#include <stdlib.h>
#include "contact.h"
#include <stdbool.h>

struct ContactBook books;

/* 主函数 */
int main()
{
    contactInit();
    
    system("clear");

    int choice = 0;
    
    while (true)
    {
        displayInterface();
        printf("请输入你的选择:");
        scanf("%d", &choice);

        switch (choice)
        {
        case 1:
            /* code */
            createContact();
            break;
        case 2:
            /* code */
            deleteContact();
            getchar();
            getchar();
            break;
        case 3:
            /* code */
            modifyContact();
            break;
        case 4:
            /* code */
            showContact();
            getchar();
            getchar();

            break;
        default:
            break;
        }
        system("clear");
    }

    return 0;
}